package com.cloudbroker.bcs.csvc.credits.api.vo.back;

import com.cloudbroker.bcs.common.annotation.HiddenIfEmpty;
import com.cloudbroker.bcs.common.entity.HSBCPSBackVO;

/**
 * Created by lili19289 on 2016/11/7.
 */
public class CreditsVO extends HSBCPSBackVO {

    @HiddenIfEmpty
    public long credits_log_id;

    public int user_credits;

    public int cost_credits;

    public int history_credits;

    public long user_id;

    public CreditsVO(){

    }


    //思迪积分操作
    public CreditsVO(IntegralBackVO integralBackVO){
        this.error_no=integralBackVO.getError_no();
        this.error_info=integralBackVO.getError_info();
        if("0".equals(integralBackVO.getError_no())){
            this.user_credits= (int) Double.parseDouble(integralBackVO.getEnable_integral());
            this.cost_credits=(int) Double.parseDouble(integralBackVO.getCost_integral());
        }

    }

    //思迪积分查询
    public CreditsVO(IntegralQueryBackVO integralQueryBackVO){
        this.error_no=integralQueryBackVO.getError_no();
        this.error_info=integralQueryBackVO.getError_info();
        if("0".equals(integralQueryBackVO.getError_no())) {
            this.user_credits = (int) Double.parseDouble(integralQueryBackVO.getEnable_integral());
            this.cost_credits = (int) Double.parseDouble(integralQueryBackVO.getCost_integral());
            this.history_credits = (int) Double.parseDouble(integralQueryBackVO.getHis_integral());
        }
    }


    public CreditsVO(long credits_log_id){
        this.credits_log_id=credits_log_id;
    }

    public long getCredits_log_id() {
        return credits_log_id;
    }

    public void setCredits_log_id(long credits_log_id) {
        this.credits_log_id = credits_log_id;
    }

    public int getUser_credits() {
        return user_credits;
    }

    public void setUser_credits(int user_credits) {
        this.user_credits = user_credits;
    }

    public int getCost_credits() {
        return cost_credits;
    }

    public void setCost_credits(int cost_credits) {
        this.cost_credits = cost_credits;
    }

    public int getHistory_credits() {
        return history_credits;
    }

    public void setHistory_credits(int history_credits) {
        this.history_credits = history_credits;
    }

    public long getUser_id() {
        return user_id;
    }

    public void setUser_id(long user_id) {
        this.user_id = user_id;
    }
}
